/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Conexao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author VENANCIO
 */
public class Conexao {
    
    private Connection con = null;
    private String status ="";
    
    public Connection getConexao() throws ClassNotFoundException{
        
        Class.forName("com.mysql.jdbc.Driver");
        try {
            con = DriverManager.getConnection("jdbc:mysql://localhost/hunterjob", "root", "");
        } catch (SQLException ex) {
            Logger.getLogger(Conexao.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        if(con!=null){
            status="STATUS = conectado";
        }else{
            status="STATUS = Não conectado";
        }
        
        return con;
    }
    
    public String getStatus(){
        return status;
    }
}
